home *** CD-ROM | disk | FTP | other *** search
/ MIDICraft's MIDINET CD-ROM / MIDICraft's MIDINET CD-ROM.iso / DOSUTILS / MIDIPAT.DOC < prev    next >
Text File  |  1996-11-05  |  8KB  |  211 lines

  1.         ******************************
  2.             MIDIPAT v1.2
  3.     
  4.           midi patch programs and banks    
  5.               by Guenter Nagler 
  6.                 1995 
  7.           (gnagler@ihm.tu-graz.ac.at)
  8.         ******************************
  9.  
  10. [0] FEATURES
  11.     + reads a binary midi file
  12.     + writes a binary midi file
  13.     + reads program translation table from a text file
  14.     + reads drum translation table from a text file
  15.     + translates GM program changes into optional hbank, lbank and
  16.       program select midi commands
  17.     + shows list of GM program names
  18.     + shows list of GM drum names
  19.  
  20. [1] BACKGROUND
  21. I am using a Korg i3 music workstation and found that some of its non-GM
  22. programs sounds better than the appropriate GM program (e.g. Pianos at
  23. C11,C14 or D11 sounds better than GM Piano at A11). I wished that I could
  24. use one of these sounds than the default instrument.
  25. From other musicians I heard that there are many midi keyboards that 
  26. are not GM compatible so that software patches must be used 
  27. to play GM midi files as the midi compositor wanted.
  28.  
  29. For both cases I found a solution in translating the GM programs
  30. into device dependent program selection.
  31.  
  32. Normal Programs (like Trumpet, Flute ...) can be directed to another
  33. program by given High Bank, Low Bank and the new Program Number.
  34. Drum Programs (like Snare, HiHat,...) are coded as notes in drum channel.
  35. They can be directed by changing note numbers.
  36. The drums program (all drums together) can be treated as a normal program.
  37.  
  38. [2] FILES DESCRIPTION
  39.  
  40. MIDIPAT.EXE.........converter program
  41. MIDIPAT.DOC.........this file, showing usage of MIDIPAT.EXE
  42. MIDIIO.HPP...........header file for a c++ midi parser
  43. MIDIIO.CPP...........source code for a c++ midi parser
  44. MIDIPAT.CPP.........c++ source code for midi to text
  45. MIDIPAT.MAK.........make file for project 
  46. MIDIPAT.CFG.........compiler options for make
  47. MIDIPAT.PRJ.........compiler project for borland c++ compilers
  48. MIDIPAT.PAT.........program translation table for instruments and drums
  49. only MIDIPAT.EXE is required to run program
  50. a patch file like MIDIPAT.PAT must be available.
  51.  
  52. [3] COPYRIGHT
  53.  
  54. MIDIPAT (c) 1995 was created by Guenter Nagler.
  55.  
  56. MIDIPAT is free and may be used as you wish with this one exception:
  57.  
  58.     You may NOT charge any fee or derive any profit for distribution
  59.     of MIDIPAT.  Thus, you may NOT sell or bundle MIDIPAT with any 
  60.     product in a retail environment (shareware disk distribution, CD-ROM,
  61.     etc.) without permission of the author.
  62.  
  63. You may give MIDIPAT to your friends, upload it to a BBS, or ftp it to
  64. another internet site, as long as you don't charge anything for it.
  65.  
  66. [4] DISCLAIMER
  67.  
  68. MIDIPAT was designed to handle 100% compatible midi files.
  69. So I give no guarantees of the results, especially with non 100% 
  70. compatible midi files.
  71. If you find a midi file that you think to be 100% compatible midi
  72. that is not correctly converted, please send a sample file to 
  73. gnagler@ihm.tu-graz.ac.at . 
  74.  
  75. Use MIDIPAT at your own risk.  Anything you do with MIDIPAT is your
  76. responsibility, and not the author's.  Any damage caused to any person,
  77. computer, software, hardware, company, or business by running MIDIPAT 
  78. is your responsibility, and the author will not be liable.
  79.  
  80. If you don't understand these terms, or are not sure of something, or
  81. are afraid something bad might come of using MIDIPAT, don't  use  it!
  82. You are here forewarned.
  83.  
  84. [5] INSTALLATION
  85.  
  86. [MSDOS]
  87. Simply copy MIDIPAT.EXE in a directory that is in your path.
  88. When you start the program without arguments
  89.  
  90. [UNIX]
  91. compile sources with your C++ compiler (e.g. GNU Compiler g++):
  92.  
  93. g++ -o midipat midipat.cpp midiio.cpp
  94.  
  95. and run program
  96.  
  97. $ midipat
  98.  
  99. C:\> MIDIPAT
  100.  
  101. you should get the usage text (see next section)
  102.  
  103. [6] USAGE
  104.  
  105. midipat translates GM programs into device dependent programs
  106. usage: midipat [-P] [-D] [-patch file.pat] [-c #] [-drum #] [-quiet] file.mid patched.m
  107. id                                                                              
  108. -P              show list of GM program names                                   
  109. -D              show list of GM drum names                                      
  110. -patch file.pat load patch from file.pat (default is midipat.pat)               
  111. -c #        modify programs on channel (1-16, default: all channels)
  112. -drum #         declare channel(s) # (1-16) as drum channel (default is 10)     
  113. -quiet          be quiet! does not write percentage info                        
  114.  
  115. The parts in brackets [...] are optional.
  116.  
  117. Option -c can be used more than once to select some channels.
  118.  
  119. Warning:
  120.   Do not expect that MIDIPAT will produce a copy of the original
  121.   file if no translations are done! MIDI allows to encode its
  122.   commands in different ways without changing the semantic of the
  123.   notes (It is allowed to compress the midi file by ommiting
  124.   redunant command bytes, but it is no duty).
  125.  
  126. [8] SUGGESTIONS / COMMENTS / BUG REPORTS / QUESTIONS
  127.  
  128.          WWW:    http://hgiicm.tu-graz.ac.at/Cpub
  129.           contains all my dos/unix midi programs
  130.          EMAIL:  gnagler@ihm.tu-graz.ac.at
  131.  
  132. [9] TRANSLATION TABLE
  133. Modify midipat.pat or modify a copy of it (if you are using alternative
  134. translation tables).
  135.  
  136. Semicolons are used for comments that stop at end of current line.
  137. this not ; but this is a comment
  138.  
  139. Numbers can be entered decimal or hexadezimal
  140. 62  ; this is a decimal value
  141. $3e ; this is a hexadecimal value that has same value as decimal 62
  142.  
  143. Normal program translations are defined by 4 entries in one line that
  144. are seperated by whitespace(s) or tab(s):
  145.  
  146. Programname  HighBank LowBank  ProgramNumber
  147. Drums           $3e       2        $1a         ; Use Dr7
  148. Piano            0     1        $40         ; Use Piano 8'
  149. P2        -     -      -           ; program 2 remains 2
  150. Marcato         0        1        $42         ; Use i3 Strings
  151.  
  152. Drums is a special program name that is used to change the whole drum set
  153. at once (e.g Dr7 drum set on i3 is DanceKit drum set).
  154. You get the Programnames by the command "midipat -P" or use
  155. Program numbers P0-P127 instead of names.
  156.  
  157. Have a look into your audiocard/keyboard manual which banks and
  158. program numbers switch to your instruments. If HighBank or LowBank
  159. is not necessary then mark the position with minus (-). If the program
  160. number is marked with - the GM program number of the instrument is used.
  161.  
  162. Drum translations need two entries in one line (seperated by spaces or tabs):
  163.  
  164. GMDrum   NewDrum
  165. Dr28       E1    ; RockKick    E1
  166. Dr29       Snare3    ; Snare3    F1
  167. Dr30     -      ; remains Dr30
  168.  
  169. Both Values can be entered in three formats:
  170. Name:    You get a list of drum names by command "midipat -D"
  171. Number:  Dr0-Dr127  (but only Dr28-Dr87 are defined by GM)
  172. Note:    Each drum represents a note in drum keyboard
  173.      Cx C#x D#x Ex Fx F#x Gx G#x Ax A#x Bx
  174.      where x=0-9 (e.g. C#2)
  175.  
  176. Send me your design of a translation table for special hardware 
  177. (need name of hardware) if you want that I add it to the WWW page
  178. (near midipat program)
  179.  
  180. [10] USE
  181. I use MIDIPAT in a dos batch file MIDI.BAT that produces temporary
  182. midi file that is played with my dos sound player:
  183.  
  184.    @echo off
  185.    midipat -patch myi3.pat %i temp.mid
  186.    playmidi temp.mid
  187.    del temp.mid
  188.  
  189. example: show a list of program names
  190.    midipat -P | more
  191.  
  192. example: show a list of drum names
  193.    midipat -D | more
  194.  
  195. example: translate an extended midi file using midipat.pat in current directory
  196.    midipat -isdrum 16 original.mid patched.mid
  197.  
  198. example: convert MT-32 midi to General Midi
  199.    midipat -patch mt2gm.pat mt32file.mid gmfile.mid
  200.  
  201. [11] CHANGES
  202. v1.0 to v1.1:
  203.   * using MidiCopy instead of MidiRead to simplify converter
  204.   * added mt2gm.pat (convert from MT-32 midi to GM midi)
  205.  
  206. v1.1 to v1.2:
  207.   * added option -c to affect only certain channel(s)
  208.     this option can be used more than once in command line
  209.  
  210.  
  211.